cmake_minimum_required (VERSION 2.6) 
PROJECT(MLGesture)
FIND_PACKAGE( OpenCV REQUIRED )
find_package(Boost COMPONENTS thread REQUIRED)
FIND_PACKAGE(Qt4 REQUIRED)



IF (${OpenCV_VERSION} VERSION_LESS 2.2.0)
MESSAGE(FATAL_ERROR "OpenCV version is not compatible : ${OpenCV_VERSION}")
ENDIF()

SET(FMODEX_INCLUDE_PATH "" CACHE PATH "PATH TO DIRECTORY WITH FMODEX HEADERS")
SET(FMODEX_LIBRARY_PATH "" CACHE PATH "PATH TO FMODEX LIBRARY DIRECTORY")
SET(FMODEX_LIBRARY "" CACHE FILE "FMODEX LIBRARY")
SET(CRYSTALSPACE_INCLUDE_PATH "" CACHE PATH "PATH TO DIRECTORY WITH CRYSTALSPACE HEADERS")
SET(CRYSTALSPACE_LIBRARY_PATH "" CACHE PATH "PATH TO CRYSTALSPACE LIBRARY DIRECTORY")
SET(CRYSTALSPACE_LIBRARY "" CACHE FILE "PATH TO CRYSTALSPACE")
SET(CRYSTALSPACE_OPENGL_LIBRARY "" CACHE FILE "CRYSTALSPACE_OPENGL LIBRARY")

SET(CRYSTALSPACE_LIBS ${CRYSTALSPACE_LIBRARY} ${CRYSTALSPACE_OPENGL_LIBRARY})


INCLUDE_DIRECTORIES(${FMODEX_INCLUDE_PATH} ${CRYSTALSPACE_INCLUDE_PATH})
LINK_DIRECTORIES(${FMODEX_LIBRARY_PATH} ${CRYSTALSPACE_LIBRARY_PATH})

add_subdirectory(mlgesture)
add_subdirectory(handMove)
add_subdirectory(handPlane)
add_subdirectory(gestureTests)
add_subdirectory(fps_demo)
add_subdirectory(GestureConfiguration)

install(FILES data/vfs.cfg DESTINATION ${CMAKE_BINARY_DIR}/app PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE)

install(DIRECTORY data/fps_data data/models data/handPlane_data data/gesture_data DESTINATION ${CMAKE_BINARY_DIR}/app FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) 
